package cn.ibizlab.odoo.core.odoo_account.filter;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;

import cn.ibizlab.odoo.util.ISearchFilter;
import cn.ibizlab.odoo.util.domain.DataObj;
import cn.ibizlab.odoo.util.SearchContext;
import cn.ibizlab.odoo.util.SearchFieldFilter;
import cn.ibizlab.odoo.util.enums.SearchFieldType;
import cn.ibizlab.odoo.util.enums.SearchGroupType;
import cn.ibizlab.odoo.util.SearchGroupFilter;
import cn.ibizlab.odoo.util.log.IBIZLog;

/**
 * 关系型数据实体[Account_account_type] 查询条件对象
 */
@Slf4j
@Data
@IBIZLog
public class Account_account_typeSearchContext extends SearchContext {

	/**
	 * 启用快速搜索
	 */
	public void setQuery(String strQuery)
	{
		 this.query=strQuery;
         if(!org.springframework.util.StringUtils.isEmpty(strQuery)){
           SearchGroupFilter searchGroupFilter=new SearchGroupFilter();
           searchGroupFilter.setSearchGroupType(SearchGroupType.OR);

           SearchFieldFilter name=new SearchFieldFilter();
           name.setParam("name");
           name.setCondition(SearchFieldType.LIKE);
           name.setValue(strQuery);
           searchGroupFilter.getCondition().add(name);
        this.getCondition().add(searchGroupFilter);



        }
	}
}
